home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Games / Freeciv / README.rulesets < prev    next >
Encoding:
Text File  |  2001-08-17  |  12.7 KB  |  351 lines

  1. ----------------------------------------------------------------------
  2.                        Freeciv Rulesets
  3. ----------------------------------------------------------------------
  4.           (Originally by David Pfitzner, dwp@mso.anu.edu.au)
  5.  
  6. Quickstart:
  7. -----------
  8.  Rulesets allow modifiable sets of data for units, advances, terrain,
  9.  improvements, wonders, nations, cities, governments and miscellaneous
  10.  game rules, without requiring recompilation, in a way which is
  11.  consistent across a network and through savegames.  (In the future
  12.  there could be other categories of rulesets.)
  13.  
  14. - To play Freeciv normally: don't do anything special; the new
  15.   features all have defaults which give the standard Freeciv 
  16.   behaviour.
  17.  
  18. - To play a game with rules more like Civ1, start the server with:
  19.        ./ser -r data/civ1.serv
  20.   (and any other command-line arguments you normally use; depending on
  21.   how you have Freeciv installed you may have to give the installed
  22.   data directory path instead of "data").  
  23.  
  24.   Start the client normally.  The client must be network-compatible
  25.   (usually meaning the same or similar version) but otherwise nothing
  26.   special is needed.  (However some third-party rulesets may
  27.   potentially require special graphics to work properly, in which case
  28.   the client should have those graphics available and be started with
  29.   an appropriate '--tiles' argument.)
  30.  
  31.   As well as a Civ1 style as above, Freeciv now has a Civ2 style
  32.   similary, although currently it is almost identical to standard
  33.   Freeciv rules.
  34.  
  35.   Note that the Freeciv AI might not play as well with rules other
  36.   than standard Freeciv.  (See notes below.)
  37.  
  38. The rest of this file contains:
  39.  
  40. - More detailed information on creating and using custom/mixed 
  41.   rulesets.
  42.  
  43. - Information on implementation, and notes for further development.
  44.  
  45. ----------------------------------------------------------------------
  46. Using and modifying rulesets:
  47. -----------------------------
  48.  
  49. Rulesets are specified using new server options.  The command above
  50. of "./ser -r data/civ1.serv" just reads a file which sets these 
  51. options (as well as a few of the standard server options).  
  52. The new server options are:
  53.  
  54.         techs, governments, units, buildings,
  55.         terrain, nations, cities, game.
  56.  
  57. They are special server options in that they take string values, but 
  58. otherwise the behave like normal server options.  Eg, try the server 
  59. command "explain techs".
  60.  
  61. For each of these options, the value of the option specifies a 
  62. subdirectory of the Freeciv data directory, containing a file
  63. name techs.ruleset, units.ruleset, buildings.ruleset, etc.
  64.  
  65. Eg, the commands:
  66.    
  67.     set techs default
  68.     set governments default
  69.     set units civ1
  70.     set buildings custom
  71.     set terrain civ2
  72.     set nations default
  73.     set cities default
  74.     set game custom
  75.  
  76. would specify the files:
  77.  
  78.     data/default/techs.ruleset
  79.     data/default/governments.ruleset
  80.     data/civ1/units.ruleset
  81.     data/custom/buildings.ruleset
  82.     data/civ2/terrain.ruleset
  83.     data/default/nations.ruleset
  84.     data/default/cities.ruleset
  85.     data/custom/game.ruleset
  86.  
  87. (This is just an example, and may not give very sensible rules; the
  88. directory data/custom and the file data/custom/buildings.ruleset do 
  89. not exist in standard Freeciv.)
  90.  
  91. The ruleset files in the data directory are user-editable, so you can
  92. modify them to create modified or custom rulesets (without having to
  93. recompile Freeciv).  It is suggested that you _don't_ edit the 
  94. existing files in the "default", "classic", "civ1" and "civ2"
  95. directories, but rather copy them to another directory and edit the
  96. copies.  This is so that its clear when you are using modified rules
  97. and not the standard ones.
  98.  
  99. The format used in the ruleset files should be fairly 
  100. self-explanatory.  A few points:
  101.  
  102. - The files are not all independent, since eg, units depend on
  103.   advances specified in the techs file.
  104.  
  105. - Wonders and city improvements have a new field, "variant".  This
  106.   allows limited changes to the effects of specific wonders and
  107.   improvements, where such changes have been implemented.  See the
  108.   "TODO Variants" section below for which variant effects which have
  109.   been implemented so far.
  110.  
  111. - Units have a new field, "roles", which is like "flags", but 
  112.   determines which units are used in various circumstances of the
  113.   game (rather than intrinsic properties of the unit).
  114.   See comments in common/unit.h
  115.  
  116. - The [units_adjust] section of the units file deserves some
  117.   explanation.  It contains the entries:
  118.  
  119.     max_hitpoints, max_firepower, firepower_factor.
  120.  
  121.   The first two entries (unless zero) override the hitpoints and 
  122.   firepower entries for individual units, as a convenience.  
  123.   The value of firepower_factor is used when combat is resolved:
  124.   All combat firepower values are multiplied by firepower_factor,
  125.   which means that the effective hitpoints of any unit is really 
  126.       (hitpoints/firepower_factor).
  127.   Actually, it is these effective hitpoints which are report to the
  128.   client for all hitpoint values.
  129.   (This complicated setup is so that the AI calculations don't 
  130.   blow up when using Civ1 rulesets.)
  131.  
  132. Properties of units and advances are now fairly well generalised.
  133. Properties of buildings are still rather inflexible.
  134.  
  135. NOTE:  There is much in the rulesets that is not completely
  136. implemented.  Be sure to read Restrictions and Limitations, below.
  137.  
  138. ----------------------------------------------------------------------
  139. The civstyle option:
  140. --------------------
  141.  
  142. The server option civstyle still exists, but its only current use is
  143. to determine how much of the map is revealed when the Apollo Program
  144. id built.
  145.  
  146. The civstyle option will be removed in the near future.
  147.  
  148. ----------------------------------------------------------------------
  149. The AI:
  150. -------
  151.  
  152. An important caveat regarding rulesets is that while rulesets allow
  153. considerable flexibility, the AI has been designed and tested using
  154. "standard Freeciv" (effectively Civ2) rules.  So the AI may not do as
  155. well with modified rules.
  156.  
  157. Some changes to the AI have been made to try to take some of the
  158. ruleset changes into account, and the combat calculations have been
  159. fudged to try to avoid core dumps, but in general you should not
  160. expect the AI to work as well with non-default options (where Civ1 is
  161. definitely included in "non-default").
  162.  
  163. Examples of problems which have not been fixed:
  164. - Units not having hitpoints in Civ1 can make a big difference to 
  165.   appropriate combat strategies.  
  166. - City walls are sufficiently different (increased build cost, and 
  167.   upkeep; and effect vs sea) to require different handling?
  168. - Without the Harbour and Offshore Platform improvements, cities with
  169.   many ocean squares are much more limited in Civ1.  
  170. - Wonders which only work on a single continent are not given special
  171.   consideration by the AI.
  172.  
  173. Hopefully this situation can be improved in the future, but the more 
  174. flexible the rules, the harder to write a good AI...
  175.  
  176. ----------------------------------------------------------------------
  177. Restrictions and Limitations:
  178. -----------------------------
  179.  
  180. units.ruleset:
  181.  
  182.   Unused entries:
  183.  
  184.     - uk_gold
  185.  
  186.   Restrictions:
  187.  
  188.     - At least one unit with role "FirstBuild" must be available
  189.       from the start (i.e., tech_req = "None").
  190.  
  191.     - There must be units for these roles:
  192.       - "Explorer"
  193.       - "FerryBoat"
  194.       - "Hut"
  195.       - "Barbarian"
  196.       - "BarbarianLeader"
  197.       - "BarbarianBuild"
  198.       - "BarbarianBoat"  (move_type must be "Sea")
  199.       - "BarbarianSea"
  200.  
  201.     - There must be at least one unit with flag "Cities".
  202.  
  203.     - Every unit with flag "Cities" must have also flag "Settlers".
  204.  
  205.   Limitations:
  206.  
  207.     - These unit flag combinations won't work:
  208.       - "Diplomat" and "Caravan"
  209.  
  210. buildings.ruleset:
  211.  
  212.   Unused entries:
  213.  
  214.     - bldg_req
  215.     - terr_gate
  216.     - spec_gate
  217.     - equiv_range
  218.     - equiv_repl
  219.     - sabotage
  220.     - effect
  221.  
  222. nations.ruleset:
  223.  
  224.   Unused entries:
  225.  
  226.     - attack
  227.     - expand
  228.     - civilized
  229.     - advisors
  230.     - tech_goals
  231.     - wonder
  232.     - government
  233.  
  234. ----------------------------------------------------------------------
  235. Implementation details:
  236. -----------------------
  237.  
  238. This section and following section will be mainly of interested to
  239. developers who are familiar with the Freeciv source code.
  240.  
  241. Rulesets are mainly implemented in the server.  The server reads the
  242. files, and then sends information to the clients.  Mostly rulesets 
  243. are used to fill in the basic data tables on units etc, but in some
  244. cases some extra information is required.
  245.  
  246. For units and advances, all information regarding each unit or advance
  247. is now captured in the data tables, and these are now "fully
  248. customizable", with the old enumeration types completely removed.  For
  249. improvements and wonders, each one has a largely unique effect, so the
  250. effects themselves are still hardwired in the code.  The "variant"
  251. field now allows some flexibility, though the effects themselves must
  252. still be hard-coded.  There are some plans to improve this situation.
  253.  
  254. ----------------------------------------------------------------------
  255. TODO:
  256. -----
  257.  
  258. - More improvement and wonder variants for Civ1 (see next section).
  259. - Other alternative (non-Civ1) variants?  (If desired.)
  260. - Better: Scrap variants completely and do something more general...
  261.  
  262. - Fix up AI dynamic government choice code.
  263. - Work on making the AI handle non-default cases better.
  264. - Could have other information to help the AI?
  265.   Eg, scores for units/techs/buildings, to help the AI know which 
  266.   ones to prefer?
  267.  
  268. - Rulesets for: time progression, ...?
  269.  
  270. ----------------------------------------------------------------------
  271. TODO Variants: 
  272. --------------
  273.  
  274. First, those variants which have been implemented:
  275. (Note Variant=0 should always be "standard Freeciv" effect.)
  276.  
  277. Barracks:     Variant=0: just works for ground units (Civ2)
  278.          Variant=1: works also for air and sea units (Civ1)
  279. Barracks II, Barracks III, Sun Tzu:
  280.          These use the same variant value and effect as
  281.          Barracks.
  282. City Walls:      Variant=0: only applies against land and heli units
  283.          Variant=1: applies against sea units too
  284. Police Station:  This uses the same variant value and effect as 
  285.          Women's Suffrage (see below).
  286.  
  287. Pyramids:     Variant=0: counts as Granary in every city (Civ2)
  288.          Variant=1: allows all government types and there is 
  289.                 no transition anarchy (Civ1)
  290. United Nations:  Variant=0: units regain extra hp per turn (Freeciv)
  291.          Variant=1: allows all government types and there is 
  292.                 no transition anarchy (Civ1) (see note(*))
  293. Hoover Dam:     Variant=0: works on all cities owned
  294.          Variant=1: only works for cities on the same 
  295.                 continent as where the wonder is built
  296. J.S. Bach:     Variant=0: works on all cities owned
  297.          Variant=1: only works for cities on the same 
  298.                 continent as where the wonder is built
  299. Women's Suff.:   Variant=0: -1 unit-unhappy per City (-2 under 
  300.                 Democracy) (Freeciv)
  301.              Variant=1: -1 unit-unhappy per Unit (Civ1)
  302. Magellan's Exp.: Variant=0: gives sea units 2 extra move points
  303.          Variant=1: gives sea units only 1 extra move point
  304. Great Wall:     Uses same variant and effect as City Walls.
  305. Leo's Workshop:  Variant=0: Upgrades one obsolete unit per game turn.
  306.          Variant=1: Upgrades all obsolete units each turn.
  307. Michelangelo's:  Variant=0: same as a Cathedral in every city
  308.          Variant=1: doubles effect of cathedrals
  309.  
  310. Other differences between Civ1 and Civ2/Freeciv which have not been
  311. implemented as variants:
  312.  
  313. Copernicus' Obs.: Freeciv: science output +50% in a city
  314.           Civ1:    doubles knowledge production in city, after
  315.                all other effects.
  316. Isaac Newton's:   Freeciv: science output +100% in a city
  317.           Civ1:    "increases effects of Libraries and 
  318.                Universities" - by how much??
  319.  
  320. There are other more minor Civ1/Civ2/Freeciv differences, which 
  321. could be handled using variants, for:
  322.     Courthouse 
  323.     Cure For Cancer
  324.     Hanging Gardens
  325.     Lighthouse
  326.  
  327. Notes:
  328.  
  329. Aqueduct and Sewer System: 
  330.    The maximum sizes for cities without these improvements is handled 
  331. separately, without using variants.  This leaves variants available 
  332. if some other effects are desired.
  333.  
  334. Colosseum, Cathedral, Temple:
  335.    Note that the technology effects on the effectiveness of these
  336. buildings are not handled by variants, but by specially noting the
  337. techs; see game.rtech fields cathedral_plus, cathedral_minus,
  338. colosseum_plus, and temple_plus.  (Also applies to Michelangelo's.)
  339.  
  340. (*) United Nations: 
  341.     I'm not sure what to do here: the diplomatic effect of Civ1,Civ2 
  342. isn't appropriate for multiplayer Freeciv, and the hp effect of 
  343. Freeciv isn't appropriate for Civ1 (no hitpoints).  The govchange 
  344. effect seems reasonable -- note there is no Statue of Liberty in 
  345. Civ1, and Pyramids, which has the same effect in Civ1, becomes 
  346. obsolete.  Alternatively a Suffrage-like effect would seem sensible: 
  347. your population is more willing to go to war if it has the sanction 
  348. of the United Nations!
  349.  
  350. ----------------------------------------------------------------------
  351.